" 禁用 python2
let g:loaded_python_provider = 0

" 标准配置
set nu
set ai
set magic
set cindent
set cursorline
set fileencodings=utf-8,utf-16le,gb2312,gbk,gb18030,usc-bom
if has('win32')
    set fileformats=dos,unix
else
    set fileformats=unix
endif
set encoding=utf-8
set ts=4
set shiftwidth=4
set expandtab
set mouse=a
set showcmd
set showmatch
set smartcase
set incsearch
set ignorecase
set hidden
set background=dark
set termguicolors

" 再次打开的时候回到上一次编辑的地方
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif

" 定义 leader 按键为空格
let mapleader=" "

" 针对一些代码文件开启自动折叠
set fdn=1
set fml=40
"au BufEnter *.py,*lua,*cpp,*.[hc],*.js set fdm=indent

" 保存sessions时去掉错误提示窗口
set sessionoptions-=blank

" 让json文件显示引号
au Filetype json let g:indentLine_setConceal = 0 | let g:vim_json_syntax_conceal = 0

" 配置GUI字体
set guifont=CaskaydiaCove\ Nerd\ Font\ Mono:h13

" 配置xaml文件类型
au BufEnter *.xaml set filetype=xml
